<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Redis\V20180412\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeReplicationGroupInstance response structure.
 *
 * @method integer getAppId() Obtain AppID。
 * @method void setAppId(integer $AppId) Set AppID。
 * @method integer getRegionId() Obtain Numerical code of a region.
 * @method void setRegionId(integer $RegionId) Set Numerical code of a region.
 * @method string getGroupId() Obtain String ID of a replication group.
 * @method void setGroupId(string $GroupId) Set String ID of a replication group.
 * @method string getGroupName() Obtain Replication group name.
 * @method void setGroupName(string $GroupName) Set Replication group name.
 * @method string getInstanceRole() Obtain Instance replication group role.
- r: secondary instance.
- rw: primary instance.
 * @method void setInstanceRole(string $InstanceRole) Set Instance replication group role.
- r: secondary instance.
- rw: primary instance.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeReplicationGroupInstanceResponse extends AbstractModel
{
    /**
     * @var integer AppID。
     */
    public $AppId;

    /**
     * @var integer Numerical code of a region.
     */
    public $RegionId;

    /**
     * @var string String ID of a replication group.
     */
    public $GroupId;

    /**
     * @var string Replication group name.
     */
    public $GroupName;

    /**
     * @var string Instance replication group role.
- r: secondary instance.
- rw: primary instance.
     */
    public $InstanceRole;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param integer $AppId AppID。
     * @param integer $RegionId Numerical code of a region.
     * @param string $GroupId String ID of a replication group.
     * @param string $GroupName Replication group name.
     * @param string $InstanceRole Instance replication group role.
- r: secondary instance.
- rw: primary instance.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("AppId",$param) and $param["AppId"] !== null) {
            $this->AppId = $param["AppId"];
        }

        if (array_key_exists("RegionId",$param) and $param["RegionId"] !== null) {
            $this->RegionId = $param["RegionId"];
        }

        if (array_key_exists("GroupId",$param) and $param["GroupId"] !== null) {
            $this->GroupId = $param["GroupId"];
        }

        if (array_key_exists("GroupName",$param) and $param["GroupName"] !== null) {
            $this->GroupName = $param["GroupName"];
        }

        if (array_key_exists("InstanceRole",$param) and $param["InstanceRole"] !== null) {
            $this->InstanceRole = $param["InstanceRole"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
